import React from "react";
import { Route, Switch, Redirect, NavLink } from "react-router-dom";
import routes from "./routes";

const Routes = () => {
  return (
    <div>
      <NavLink to="/">home</NavLink>
      <NavLink to="/foo">|foo</NavLink>
      <NavLink to="/foo/foo">|foo/foo</NavLink>
      <NavLink to="/dma/foo">|dma_foo</NavLink>
      <NavLink to="/dma/bar">|dma_bar</NavLink>
      <NavLink to="/web4?client=city">|web4</NavLink>
      <Switch>
        {routes}
        {/* <Redirect from="/web4" to={{pathname:location.pathname,search:location.search}} />
        <Redirect to="/notFound" /> */}
      </Switch>
    </div>
  );
};

export default Routes;
